<template>
  <div>
    <van-cell :title="name" :label="author" center
    @click="$router.push({path:'/comment',query:{id:id}})"
    >
      <!-- 使用 right-icon 插槽来自定义右侧图标 -->
      <template #right-icon>
        <van-icon center name="play-circle-o" class="search-icon" 
        @touchstart="play"
        />
      </template>
    </van-cell>
  </div>
</template>

<script>
export default {
  props: {
    name: String,
    author: String,
    id: Number,
  },
  methods:{
      play(){
          this.$router.push({
              path:"/play",
              query:{
                  id:this.id
                  
              }
          })
      }
  }
};
</script>

<style scoped>
.search-icon {
  font-size: 23px;
  line-height: inherit;
}
</style>